Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring code to resolve issue #111 dealing with cognitive complexity #172

Closed
wants to merge 4 commits into from

Conversation

tjpatel04
Copy link

@tjpatel04 tjpatel04 commented Jan 24, 2025

Created multiple helper functions to reduce complexity with conditional statements in code. Created a helperand function which was called at any instance when a conditional used "&&" and caused a warning. Created a helperor function which was called at any instance when a conditional used "||" and caused a warning. Helper functions reduced overall cognitive complexity from 19 to 15.

@coveralls
Copy link

coveralls commented Jan 24, 2025

Pull Request Test Coverage Report for Build 13233911841

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 82.673%

Totals Coverage Status
Change from base Build 12896760049: 0.002%
Covered Lines: 22326
Relevant Lines: 25585

💛 - Coveralls

@tjpatel04 tjpatel04 changed the title used helper functions to reduce cognitive complexity Adding helper functions to resolve issue #172 Jan 24, 2025
@tjpatel04 tjpatel04 changed the title Adding helper functions to resolve issue #172 Adding helper functions to resolve issue #111 Jan 24, 2025
@tjpatel04 tjpatel04 changed the title Adding helper functions to resolve issue #111 Adding helper functions to resolve issue #111 dealing with cognitive complexity Jan 24, 2025
@tjpatel04 tjpatel04 changed the title Adding helper functions to resolve issue #111 dealing with cognitive complexity Refactoring code to resolve issue #111 dealing with cognitive complexity Jan 24, 2025
@tjpatel04 tjpatel04 closed this Feb 10, 2025
@tjpatel04 tjpatel04 deleted the src/api/groups.js branch February 10, 2025 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants